package mrusanov.buildings

import mrusanov.team.Club

abstract class Building(parent:ClubBuildings) {
  private var _usageLevel = 0
  var buildingLevel = 0
  def usageLevel = _usageLevel
  def usageLevel_=(level:Int) {
    require(level <= buildingLevel, "Usage level is bigger than building level!")
    _usageLevel = level
  }

  def maintenanceCost = 0
  def upgradeCost = 0

  def increaseLevel() {
    parent.increaseLevel(this)
  }
}
